import request from '@/utils/request'

// 查询题库列表
export function listQuestionBank(query) {
    return request({
        url: '/admin/questionBank/list',
        method: 'get',
        params: query
    })
}

// 查询题库详细
export function getQuestionBank(questionId) {
    return request({
        url: '/admin/questionBank/' + questionId,
        method: 'get'
    })
}

// 新增题库
export function addQuestionBank(data) {
    return request({
        url: '/admin/questionBank',
        method: 'post',
        data: data
    })
}

// 修改题库
export function updateQuestionBank(data) {
    return request({
        url: '/admin/questionBank',
        method: 'put',
        data: data
    })
}

// 删除题库
export function delQuestionBank(questionId) {
    return request({
        url: '/admin/questionBank/' + questionId,
        method: 'delete'
    })
}
